import request from '@/utils/request'

// 查询工艺管理加工任务 列表
export function listWorking(query) {
    return request({
        url: '/technology/technologyWorking/list',
        method: 'get',
        params: query
    })
}

// 查询工艺管理加工任务 详细
export function getWorking(workingId) {
    return request({
        url: '/technology/technologyWorking/' + workingId,
        method: 'get'
    })
}

// 新增工艺管理加工任务 
export function addWorking(data) {
    return request({
        url: '/technology/technologyWorking',
        method: 'post',
        data: data
    })
}

// 修改工艺管理加工任务 
export function updateWorking(data) {
    return request({
        url: '/technology/technologyWorking',
        method: 'put',
        data: data
    })
}
// 强制修改工艺管理加工任务 
export function forceEditWorking(data) {
    return request({
        url: '/technology/technologyWorking/forceEdit',
        method: 'put',
        data: data
    })
}
// 删除工艺管理加工任务 
export function delWorking(workingId) {
    return request({
        url: '/technology/technologyWorking/' + workingId,
        method: 'delete'
    })
}

export function listMaterialAddMethod() {
    return request({
        url: '/technology/materialAddMethod/list',
        method: 'get'
    })
}
export function startWorking(workingId) {
    return request({
        url: '/technology/technologyWorking/start/' + workingId,
        method: 'get'
    })
}
export function suspendWorking(workingId) {
    return request({
        url: '/technology/technologyWorking/suspend/' + workingId,
        method: 'get'
    })
}
export function continueWorking(workingId) {
    return request({
        url: '/technology/technologyWorking/continueWorking/' + workingId,
        method: 'get'
    })
}
export function finishWorking(workingId) {
    return request({
        url: '/technology/technologyWorking/finish/' + workingId,
        method: 'get'
    })
}
// 加工任务维护-加工材料
export function getTechnologyWorkingMaterial(query) {
    return request({
        url: '/technology/technologyWorkingMaterial/list',
        method: 'get',
        params:query
    })
}
// 加工任务-不分页数据，下拉数据
export function getTechnologyWorkingList(query) {
    return request({
        url: '/technology/technologyWorking/getTechnologyWorking',
        method: 'get',
        params:query
    })
}

// 加工任务-添加任务附件
export function technologyWorkingAttach(data) {
    return request({
        url: '/technology/technologyWorkingAttach',
        method: 'post',
        data:data
    })
}
// 加工任务-任务附件列表
export function technologyWorkingAttachList(query) {
    return request({
        url: '/technology/technologyWorkingAttach/list',
        method: 'get',
        params:query
    })
}
// 删除
export function technologyWorkingAttachDel(data) {
    return request({
        url: '/technology/technologyWorkingAttach/'+data,
        method: 'delete'
    })
}

// 加工任务-采集数据
export function getDataCollectData(query) {
    return request({
        url: '/technology/technologyWorking/getDataCollectData',
        method: 'get',
        params:query
    })
}